<!--#include file="pj.asp"-->
<!DOCTYPE html>
<html>
<head>
<%
  easp.include "h.asp"
  dim tn
  'Easp.Db.Del "[baseinfo]","mode='upf_1'"
  vas "allow_upf_1","zip|rar|7z|pdf|qes|txt|sql|csv|chm"
  vas "title","湖南省中医药研究院附属医院--古籍在线阅览"
%>
  <style type="text/css">
    .layui-upload-drag {
      display: block;
      margin: 10px 0px;
    }
    .layuiadmin-reply{
      position: absolute;
      right: 10px;
      bottom: 10px;
    }
    .layuiadmin-card-link a {
    display: inline-block;
    width: 10%;
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}
.is-primary {
    height: 30px;
    line-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    margin-bottom:5px;
    margin-right:5px;
}
#noti{
  font-size:15px;
}
.lse_label{
  margin-bottom:10px;
  margin-top:10px;
}

.get_sel{
  background-color: #31BA6B;
  //color: #31BA6B;
}
  </style>
  <title><%=val("title")%></title>
</head>
<body>
  <div class="layui-fluid">
  <%blockquote(val("title"))%>
  <div class="layui-card">
          <div class="layui-card-header"><%=val("tt1")%></div>
          <div class="layui-card-body">
            <div id="ml" class="layuiadmin-card-link">
            </div>        
          </div>
        </div>
<div class="lse_label">1.姓名</div>
<div class="layui-card">
          <div class="layui-card-body">
            <div id="xm" class="layui-btn-container">
              

            </div>
          </div>
        </div>
<div class="control">
  <input id="noti" class="input" type="text" value="" readonly>
</div>

<div class="lse_label">2.手机号</div>
<%
 input "phone",""
%>
<div class="lse_label">3.请上传健康码截图</div>
		<div class="layui-upload-drag" id="test10">
      <i class="layui-icon"></i>
      <p>请上传健康码截图</p>
	  </div>
    <div class="layui-card"><br>

      <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="test_form">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">检索</label>
            <div class="layui-input-block">
              <input type="text" lay-filter="log1_search" id="log1_search" name="<%=tn%>_search" class="layui-input" value="<%=val("log1_search")%>">
            </div>
          </div>

          <div class="layui-inline">
              <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="<%=tn%>_search">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
          </button>
         <%
            'btn0 tn&"_add2","新增题目" 
            'btn0 "free","自由练习"
         %>
         </div>
        </div>
        <div class="layui-card-body">
              <dl class="layuiadmin-card-status">
                <%
                  dim i,arr,title_
                  hi "page",val("page")
                  hi "upf_1_count",""
                %>
              </dl> 
		</div>
  </div>
  <script src="/dzps/src/layuiadmin/layui/layui.js"></script> 
  <script>
  layui.config({
    base: '/dzps/src/layuiadmin/' 
  }).extend({
    index: 'lib/index'
    ,mymod: '../../yx/js/mymod' 
 
  }).use(['element', 'mymod','index', 'useradmin','upload','table'], function(){
    var $ = layui.$,form = layui.form,admin = layui.admin,upload = layui.upload,table=layui.table,laypage = layui.laypage,mymod = layui.mymod,element = layui.element;
  var fn='';
  $("#demo").hide(); 

function pad(num, n) {
  var len = num.toString().length;
  while(len < n) {
    num = "0" + num;
    len++;
  }
  return num;
}
  var tpage ='<%=val("tpage") %>';
  for(var i=1;i<=tpage;i++){
    $("#ml").append("<a href='upload/antique/<%=val("name3")%>/"+pad(i,4)+".jpg'"+" >第"+i+"页"+"</a>");  
    $("#xm").append("<button aaa='bbbiiiiiiiiiiiiiiiiiiii' id='bbc' class='button is-primary is-outlined'>"+i+"</button>");
  }

  $(".is-primary").click(function(e){
      //alert($(this).text());
      var ts=this.getAttribute("aaa");
      //alert(ts);

      $(this).addClass("get_sel");
      $("#noti").val("当前已选："+$(this).text())
  })

  upload.render({
    elem: '#test10'
    ,url: location.protocol+'//'+location.host+'/dzps/yx/up_t_content.asp?now=' + new Date().getTime()
    ,accept: 'file' //普通文件
    ,exts:'<%=val("allow_upf_1")%>'  //允许上传
    ,before: function(obj){ 
    obj.preview(function(index, file, result){
      fn=file.name;
      $("#demo").show(); 
    });
    }
  ,error: function(index, upload){
      $("#demo").hide();  
  }    
 ,progress: function(n, elem, res, index){
    var percent = n + '%' 
    element.progress('demo', percent); 
    element.progress('demo', n + '%'); //进度条
  }
    ,done: function(res){
      if(res.code == 0){      //code=0代表上传成功
        layer.msg('上传成功！！|'+ res.msg); 
        $.post('pj.asp?now=' + new Date().getTime(), {
							action: "upf_1_add",name1:res.msg,name2:fn,name3:"<%=Format_Time(now(),1)%>"
						},
						function(data) {
							var jsonObj = $.parseJSON(data);
						});
            mymod.l_data("<%=Easp.Db.PageSize%>");  
            $("#demo").hide();      
      }
    }
  });
  mymod.l_data("<%=Easp.Db.PageSize%>");
  });
  </script>
</body>
</html>